﻿<div class="box width-100">
                                                <div class="box-ctn">
                                                    <div class="article-title-c width-100">Thực đơn Thuyền Chài</div>
													<div class="clear"></div>
													<div class="list">
                                                    <div class="flexslider">
                                                            <ul class="slides">
<?php 
$page = 1;
$lang = $this->arrParam['lang'];
if(empty($lang)){
	$lang = 'vi';
}else{
	$lang = $this->arrParam['lang'];
}
										$check	= 0;
                                    	//menu
                                    	$tblGroupCategory= $this->tblGroupCategory;
                                    	//echo "<pre>"; print_r($tblGroupCategory); exit;
                                    	$tblCutring	= new Zendvn_File_CutTring();
                                    	if(!empty($tblGroupCategory)){
                                    	$nubCat	= count($tblGroupCategory);	
                                    	for($i=0; $i<$nubCat; $i=$i+4){	
                                    		//echo $name= $tblGroupCategory[$i]['name'];
                                    	//foreach($tblGroupCategory as $key	=> $val) {
//                                     		$status	= $val['status'];
//                                     		$parents	= $val['parents'];
//                                     		if($status=='1' && !empty($parents)){
// 											$status	= $val['status'];
// 											$parents	= $val['parents'];
// 												$cid	= $val['id'];
// 												$nameTmp	= $val['name'];
// 												$name	= $tblCutring->cutTring('14', $nameTmp, null);	
// 												$alt	= $val['alias'];
												
												
// 												$urlOptions = array('module'=>'products',
// 														'controller'=>'index',
// 														'action'=>'category',
// 														'cid'=>$cid,
// 														'name'=>$alt,
// 														'lang'=>$lang,	
// 														'page'=>$page);
// 												$link 	= $this->url($urlOptions,'products-category');
												
                                    	?>
											<li>
                                                                    <ul class="lv2">
                                                                    <?php //echo "<pre>";
                                                                    if($i<=$nubCat && $tblGroupCategory[$i]['id']!=''){
																		$cid= $tblGroupCategory[$i]['id'];
																		$cid = array('module'=>'products',
																				'controller'=>'index',
																				'action'=>'category',
																				'cid'=>$cid,
																				'name'=>$tblGroupCategory[$i]['alias'],
																				'lang'=>$lang,
																				'page'=>$page);
																		$cid 	= $this->url($cid,'products-category');
                                                                    ?>
                                                                        <li><a <?php if($this->arrParam['cid']==$tblGroupCategory[$i]['id']) echo 'class="act"'; ?> 
                                                                        href="<?php echo $cid;?>" title="Món 01"><?php echo $tblGroupCategory[$i]['name'];?></a></li> <?php }?>
                                                                    <?php 
                                                                    if($i+1<=$nubCat && $tblGroupCategory[$i+1]['id']!=''){
																		$cid= $tblGroupCategory[$i+1]['id']; 
																		$cid = array('module'=>'products',
																				'controller'=>'index',
																				'action'=>'category',
																				'cid'=>$cid,
																				'name'=>$tblGroupCategory[$i+1]['alias'],
																				'lang'=>$lang,
																				'page'=>$page);
																		$cid 	= $this->url($cid,'products-category');	
																	?>
                                                                        <li><a <?php if($this->arrParam['cid']==$tblGroupCategory[$i+1]['id']) echo 'class="act"'; ?> 
                                                                        href="<?php echo $cid;?>" title="Món 01">
                                                                        <?php echo $tblGroupCategory[$i+1]['name'];?></a></li> <?php }?>
                                                                        
                                                                    <?php if($i+2<=$nubCat && $tblGroupCategory[$i+2]['id']!=''){
                                                                   		$cid= $tblGroupCategory[$i+2]['id'];
																		$cid = array('module'=>'products',
																				'controller'=>'index',
																				'action'=>'category',
																				'cid'=>$cid,
																				'name'=>$tblGroupCategory[$i+2]['alias'],
																				'lang'=>$lang,
																				'page'=>$page);
																		$cid 	= $this->url($cid,'products-category');	
                                                                    	?>
                                                                        <li><a <?php if($this->arrParam['cid']==$tblGroupCategory[$i+2]['id']) echo 'class="act"'; ?> 
                                                                        href="<?php echo $cid;?>" title="Món 01"><?php echo $tblGroupCategory[$i+2]['name'];?></a></li> <?php }?>     
                                                                        
                                                                        
                                                                      <?php if($i+3<$nubCat && $tblGroupCategory[$i+3]['id']!=''){
                                                                      	$cid= $tblGroupCategory[$i+3]['id'];
																		$cid = array('module'=>'products',
																				'controller'=>'index',
																				'action'=>'category',
																				'cid'=>$cid,
																				'name'=>$tblGroupCategory[$i+3]['alias'],
																				'lang'=>$lang,
																				'page'=>$page);
																		$cid 	= $this->url($cid,'products-category');	
                                                                      	?>
                                                                        <li><a <?php if($this->arrParam['cid']==$tblGroupCategory[$i+3]['id']) echo 'class="act"'; ?> 
                                                                        href="<?php echo $cid;?>" title="Món 01"><?php echo $tblGroupCategory[$i+3]['name'];?></a></li> <?php }?>   
                                                                        
                                                                    </ul>
                                                                </li>
										
										<?php 
                                    		}
                                    	}
                                    	else echo "<p style='text-align:center'>"."Chưa có danh mục nào !"."</p>";
										?>	
                                                            
                                                        </ul>
                                                    </div>
                                                    <script type="text/javascript">
                                                        $(window).load(function() {
                                                            $('.flexslider').flexslider({
                                                              animation: "slide",
                                                              animationLoop: true,
                                                              itemWidth: 200,
                                                              itemMargin: 10
                                                            });
                                                          });
                                                      </script>
                                                    	<div class="clear"></div>
                                                  </div>  
                                                  <div class="clear"></div>
                                                    
                                                    
                                                    <div class="clear"></div>
<!--                                                    <div class="button">-->
<!--                                                        <a href="#" title="Back" class="back">&nbsp;</a>-->
<!--                                                        <a href="#" title="Next" class="next">&nbsp;</a>-->
<!--                                                    </div>-->
<!--                                                    <div class="clear"></div>-->
                                                </div>
                                            </div>